package cn.tedu.charging.device.controller;

import cn.tedu.charging.common.protocol.JsonResult;
import cn.tedu.charging.device.service.GunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 负责枪的业务模块
 */
@RestController
public class GunController {
    @Autowired
    private GunService gunService;
    /**
     * 服务间 调用接口
     * 查询是否枪可以使用
     */

    @PostMapping("/device/gun/check")
    public JsonResult<Boolean> checkGun(@RequestParam("gunId") Integer gunId){
        return JsonResult.ok(gunService.checkGun(gunId));
    }
}






















